package com.zmn.plat.task;

import com.github.ltsopensource.spring.boot.annotation.EnableJobClient;
import com.github.ltsopensource.spring.boot.annotation.EnableTaskTracker;
import com.zmn.manager.common.database.config.SimpleDataSourceConfiguration;
import com.zmn.manager.mq.annotation.EnableMQConsume;
import com.zmn.manager.mq.annotation.EnableMQSend;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
import org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.transaction.annotation.EnableTransactionManagement;


/**
 * @uthor nowind
 * @since 2018-09-18 09:36
 */
@SpringBootApplication(scanBasePackages = {"com.zmn.plat", "com.zmn.manager.common"},
        exclude = {DataSourceAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class, RestClientAutoConfiguration.class, RestClientAutoConfiguration.class})
@EnableTaskTracker
@EnableJobClient
@EnableTransactionManagement
//@EnableElasticsearchRepositories(basePackageClasses = {EsPartSkuWorkRepository.class,})
@EnableMQSend
@EnableMQConsume
@Import(value = {SimpleDataSourceConfiguration.class})
public class TaskApplication {

    public static void main(String[] args) {
        System.setProperty("es.set.netty.runtime.available.processors", "false");
        SpringApplication.run(TaskApplication.class, args);
    }
}
